package month4.day6;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Lesson {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        try {
            System.out.println("输入总课时");
            int a=in.nextInt();
            System.out.println("输入课程数");
            int b=in.nextInt();
            int c=a/b;
            if(c<100)
                throw new Exception("课时太少");
            System.out.println("平均课时:"+c);
        } catch (ArithmeticException e) {
            System.out.println("除数不能为零");
            e.printStackTrace();
        }catch (InputMismatchException e) {
            System.out.println("输入错误");
            e.printStackTrace();
        }catch (Exception e) {
            e.printStackTrace();
        }

    }
}
